user = 'yanglt'
password = 'yanglt'
num1 = 3
while num1:
    u = str(input('请输入用户名:'))
    p = str(input('输入密码:'))
    if u == user and p == password:
        print("登录成功")
        break
    else:
        print("用户名或密码错误")
    num1 -= 1


# input取得的输入结果默认就是str类型，不需要str再次进行转换
